from django.urls import path, re_path

from app_user.views import test, username_count, tel_count, get_captcha, send_code_by_sms, RegisterCreateView, \
    login_by_sms, login_by_pwd

urlpatterns = [
    path('test', test),
    re_path(r'^username/(?P<username>\w{5,20})/$', username_count),
    re_path(r'^tel/(?P<tel>1[356789]\d{9})/$', tel_count),
    re_path(r'^captcha/(?P<username>\w{5,20})/$', get_captcha),
    re_path(r'^sms/(?P<tel>1[356789]\d{9})/$', send_code_by_sms),
    path('register/', RegisterCreateView.as_view()),
    path('login/sms/', login_by_sms),
    path('login/pwd/', login_by_pwd),
]
